import request from '@/utils/request'

// 单人人脸验证
export function faceVerify(imageBase) {
  return request({
    url: '/face/vef',
    method: 'post',
    data: imageBase
  })
}

// 双人人脸比对
export function compareFaces(data) {
  return request({
    url: '/face/compare',
    method: 'post',
    data: data
  })
}

// 查询人脸列表
export function listFace(query) {
  return request({
    url: '/face/faceList',
    method: 'get',
    params: query
  })
}

// 获取人脸详情
export function getFace(fid) {
  return request({
    url: `/face/info/${fid}`,
    method: 'get'
  })
}

// 新增人脸
export function addFace(data) {
  return request({
    url: '/face/save',
    method: 'post',
    data: data
  })
}

// 修改人脸
export function updateFace(data) {
  return request({
    url: '/face/update',
    method: 'post',
    data: data
  })
}

// 删除人脸
export function delFace(fid) {
  return request({
    url: `/face/faceDelete/${fid}`,
    method: 'get'
  })
}

// 查询所有验证人脸日志信息
export function listLog(query) {
  return request({
    url: `/face/log/list`,
    method: 'get',
    params: query
  })
}
